using System;
using System.Collections.Generic;
using System.Text;
using System.Management;

namespace DependencyTest.Helpers
{
    static class InstalledHotFixes
    {
        public static bool IsHotFixInstalled(string hotFixNumber)
        {
            string query = string.Format("select * from Win32_QuickFixEngineering where HotFixId = '{0}'", hotFixNumber);
            SelectQuery selectQuery = new SelectQuery(query);
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(selectQuery);

            return (searcher.Get().Count > 0);
        }
    }
}
